<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%@ page import="org.tobuy.vo.*" %>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>Registration</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>

    <%
    	User user = (User)session.getAttribute("user");
    	if(user!=null){
    		%>
    			
    				<h2>You are logged in as <%=user.getUser_name() %> currently, please <a href="logout.jsp">logout</a> first!</h2>
    			
    		<%
    	}else{
    		%>
    			<br><h2>Registration</h2>
    			<h3>Please fill out the information and click submit.</h3>
    			<form action="RegistrationServlet" method="post">
    			E-mail:<input type="text" name="userid"> *<br><br>
   				Name:<input type="text" name="username">*<br><br>
   				Password:<input type="password" name="userpass">*<br><br>
  				Address:<input type="text" name="address">*<br><br>
  				  <span>Please notice that all the fields marked with * must be filled!</span><br><br>
  				  <input type="submit" value="submit">
  				  <input type="reset" value="reset"><br>
  				  
    </form>
    		
    		<%
    	}
    %>

  </body>
</html>
